home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / utilitys / 173 / stxf21.doc < prev    next >
Text File  |  1988-07-29  |  32KB  |  628 lines

  1.  
  2.                     ST XFORMER II Short Documentation
  3.                     ---------------------------------
  4.                   This file must accompany STXFII.PRG!!
  5.  
  6. update 2.1  --  July 29, 1988.
  7.  
  8. This update completely replaces the original version 2.00 release of July
  9. 1 and the 2.01 and 2.02 updates since then. If you know of any bulletin
  10. board that carries version 2.00, please upload to them this newest version,
  11. in its ARCed form. Please include all of the ARC files:
  12.  
  13.     STXF21.ARC - contains STXF21.PRG and this text file (for 1Meg users)
  14.     STXFXP.ARC - contains the ST Xformer File Xfer Program (all)
  15.     STXPP2.ARC - program pack #2 (Turbo Basic and DOS 2.0D)
  16.  
  17. note: replace STXFII.PRG (version 2.0x) with STXF21.PRG.
  18.  
  19. Dont forget to mention that to save download time, and to receive the
  20. ST Xformer Users Manual, the above files and more, send a money order
  21. for $20 US or $20 Cnd to:
  22.  
  23.     Darek Mihocka
  24.     310-D Bluevale St. N.
  25.     Waterloo, Ontario  N2J 4G3
  26.     CANADA
  27.  
  28. If you have questions, I can be reached by voice at (519)-747-0386.
  29.  
  30. If you only have a 512K Atari 520ST, you can still run ST Xformer Junior,
  31. which is already available, and should be at a BBS near you. It is not
  32. included in this update because it will not be updated further.
  33. This file only covers the 1040ST/Mega ST version, which will continue
  34. to be updated regularly.
  35.  
  36.  
  37.                           Contents of this file:
  38.                           ----------------------
  39.  
  40.          Part I    - Summary of Features
  41.          Part II   - Changes from Xformer 1.2
  42.          Part III  - Atari 800/800XL emulation and FXP
  43.          Part IV   - Apple and Commodore emulation
  44.          Part V    - Updates and future versions
  45.          Part VI   - Invitation to 8 bit programmers
  46.          Part VII  - Other comments
  47.          Part VIII - User Poll
  48.          Part IX   - Patching the emulator
  49.  
  50.  
  51.                                  Part I
  52.                                  ------
  53.  
  54. ST  Xformer II is a software emulator of the 6502 microprocessor.  On a  
  55. standard ST,  running on a 68000 at 8 MHz, it executes roughly 80,000 to
  56. 100,000  instructions  per  second,  or about 40% the speed  of  a  6502
  57. machine.  It hasn't been tested on any of the accelerator boards now out
  58. for the ST.
  59.  
  60. In  addition  to  the 6502 emulation,  3 hardware  emulation  modes  are
  61. available:  Atari 800/XL/XE,  Apple ][,  and Commodore 64. Each of the 
  62. hardware emulation modes is explained later.
  63.  
  64. ST  Xformer  II is GEM based,  and runs on any color  or  monochrome  ST
  65. system  with at least 1 Megabyte of memory.  It runs off floppy  or  the
  66. hard disk.  It must be booted in either medium (80 column color) or high
  67. (monochrome) resolution.
  68.  
  69. If the program runs out of memory (800K is required) or it is booted  in
  70. low  resolution,  an  error  message appears  and  the  program  exists.
  71. Therefore,  if  you  only have a 1 Meg machine,  make  sure  all  memory
  72. intensive desk accessories and AUTO boot programs are disabled. Version 2.1
  73. is more memory efficient than version 2.0, and will load on a 1 meg machine
  74. with something like Deskcart or Control Panel installed.
  75.  
  76. Xformer works on 1040 ROMs, Mega ROMs, and the "new" ROMs.
  77.  
  78. Online help can be accessed from the menu bar under the "Help" entry. It
  79. very briefly summarizes the most common procedures.
  80.  
  81. Atari  800  support now includes DOS and non-DOS  disk  support,  Player
  82. Missle Graphics,  emulation of most of the NMI and IRQ  interrupts,  and
  83. emulation of most of the ANTIC, POKEY, and GTIA hardware registers. This
  84. release has 2 promised features missing (hey,  this program took a _lot_
  85. longer to write than planned): display list interrupt support, and 130 XE
  86. bank select memory emulation.  Other less serious cosmetic problems  are
  87. the  lack of GTIA support.  I simply ran out of colors registers on  the
  88. ST.  These  bugs,  and  any others reported by users will  be  fixed  an
  89. available on the update disk for registered users.
  90.  
  91. The following changes exist between version 2.0 and 2.1:
  92.       - 800XL RAM under ROM memory emulation added
  93.       - double density disk drive support added
  94.       - better player missle graphics support
  95.       - limited Apple ][ support
  96.       - "3 bombs in color", "black stripes in mono", and "crashes to the
  97.         menu bar" bugs fixed
  98.       - addition of the ST Xformer File Xfer Program added
  99.  
  100.  
  101.                                  Part II
  102.                                  -------
  103.  
  104. Xformer  II  represents almost a year of effort on my part to  take  the
  105. various Xformer 1.x versions and join them into one unit.  Thus, Xformer II
  106. replaces the Xformer 1.1 and 1.2 Atari 800 emulators, and the Xformer 1.0x
  107. Apple ][ emulator, which never really got released.
  108.  
  109. The  user  interface  is totally redesigned.  Instead of  a  text  based
  110. keyboard  entry  style interface,  Xformer II uses GEM for most  of  its
  111. functions.   This  greatly  improves  usability,  which  was  one  major
  112. complaint of the previous emulators.
  113.  
  114. Xformer  II also runs twice as fast as the previous versions.  The  6502
  115. emulator was rewritten to use a different p-code interpretter algorithm,
  116. and all the assembly code was tightened up even more.
  117.  
  118. Xformer II does away with all the extra files that were required for use
  119. with previous versions.  The Atari ROMs are stored in STXF21.PRG itself,
  120. and  DOS  emulation is handled differently,  as explained in  the  Atari
  121. section.
  122.  
  123.  
  124.                                  Part III
  125.                                  --------
  126.  
  127. If  you currently use Xformer 1.1 or 1.2,  forget everything  you  know!
  128. I've  redesigned everything.  STXF21.PRG now contains all the Atari  ROM
  129. code  built in to it,  so you no longer need to rename files and do  all
  130. the silly things I required you to do (he he).
  131.  
  132. When  you boot the program,  click the Atari logo on the  title  screen.
  133. Then  go up to the "Xformer II" menu entry and select the Atari  option.
  134. An Atari Configuraton dialog box will appear.
  135.  
  136. It  should  be  fairly self explanatory.  You can  select  either  Atari
  137. 400/800  ROMs (also known as ROM revision B) or the  XL/XE  ROMs,  which
  138. give  you the faster text and graphics output,  and access  to  graphics
  139. modes 12, 13, 14 and 15.
  140.  
  141. Thanks  to Charles Marslett's fine work on the Fastchip floating  point,
  142. and  with  his  permission,  you can select between  the  regular  Atari
  143. floating point routines,  or his Fastchip routines,  which can  increase
  144. the speed of math operations (and BASIC) by up to a factor of 3.
  145.  
  146. Speaking  of  BASIC,  you can have it either IN or OUT.  Xformer  II  no
  147. longer supports any other cartridges,  since no one ever indicated to me
  148. that they used that feature. However, cartridges transfered to disk will
  149. work. More on disk files in a few paragraphs.
  150.  
  151. There is one rather cryptic option called "VBI Rate". This refers to how
  152. often the emulator emulates vertical blank interrupts. The default is 1,
  153. which means an Atari 800 VBI occurs every 1 ST vertical blank,  i.e.  60
  154. times per seconds.  Similarly,  setting this option to 2 will give you a
  155. 60/2 = 30Hz VBI rate, and setting it to 3 sets it to 60/3 = 20Hz.
  156.  
  157. WHY???????  (you  ask?) Simple.  The standard operating system  vertical
  158. blank interrupts take up about 3 or 4% or the total processor time on an
  159. Atari 800.  On the emulator though,  which still has to process the same
  160. number of VBI's each second, (but does it at a slower speed), about 15 -
  161. 20% of the time is spent servicing the interrupts.  This slows down most
  162. programs by 15 or 20%. Therefore Atari BASIC appears to run at about 30%
  163. the normal speed. To fix this, I added the option so that you can reduce
  164. the number of VBI's,  and give more processor time back to programs like
  165. BASIC.  Try it at a setting of 3.  BASIC now speeds up to over 35%. Kill
  166. vertical blanks all together (with a POKE 54286,0) and the emulator  now
  167. runs at over 40% speed.
  168.  
  169. Now, the disk support. Read this CAREFULLY!!
  170.  
  171. On a regular 5 1/4" single sided single density floppy  disk,  formatted
  172. on an 810 disk drive,  you will get 90K of storage.  This is derived  by
  173. taking the number of tracks (40),  the number of sectors per track  (18)
  174. and the number of bytes per sector (128) to give a total of 40*18*128  =
  175. 92160 = 90K.
  176.  
  177. Similarly, on a double density disk, with 256 byte sectors, you can get
  178. 40*18*256 = 184320 bytes = 180K of storage.
  179.  
  180. Therefore I selected the following method to emulate the 8 bit disk drives.
  181. THIS IS DIFFERENT THAN THE METHOD USED IN XFORMER 1.2!!!!!
  182. The procedure is also slightly different from version 2.0.
  183.  
  184. In the ARC file for ST Xformer 2.0, there was a file called DEMODISK.SD.
  185. In this release, in the STXPP2.ARC file. there is a file called TURBOBAS.SD.
  186. It is 90K long. (note: you can also use file out of STXPP1.ARC, released
  187. a few weeks ago). There 90K long files are bit images of a real 8 bit disk.
  188. When you port a file to the ST, you must first copy it into one of these
  189. file so that the emulator can use it. It is similar to the way files are
  190. merged together into an ARC file for use with the ARC utility.
  191.  
  192. As a convention, I've chosen the the .SD extender for 90K single density
  193. files, and .DD for 180K double density files.
  194.  
  195. What does this mean to you?  Well it means that instead of porting files
  196. one by one to the ST,  you can port over entire disks! The disks must be
  197. formatted in single density and unprotected,  but besides that, there is
  198. no limit to what can be on the disk.  I have tested Xformer II with  DOS
  199. 2.0,  DOS 2.5, DOS 4.0, Sparta DOS 1.1, and MyDos 4.1 with full success.
  200. All the other DOSes _should_ work assuming you configure them for an 810
  201. drive _before_ porting the disk over.
  202.  
  203. Now,  how  do you port a disk?  Most of you should be familiar with  the
  204. Disk  Communicator  program  by  Robert Puff.  It  is  known  simply  as
  205. DiskComm, and 3.2 is the latest version. Note that DC32.COM is supplied.
  206. DiskComm is basically a disk scruncher and unscruncher.  It takes a disk
  207. and compresses it into a single file,  which can be easily transfered by
  208. modem to another computer, and uncompressed.
  209.  
  210. Now,  boot up your favorite terminal software on your 8 bit  Atari,  and
  211. boot up your favorite ST terminal software, set them both to XMODEM, and
  212. port DC32.COM to your 8 bit. Even if you already have Diskcomm on your 8
  213. bit port over this version!!!!!
  214.  
  215. To port over an individual file, use the same method. Simply transfer it
  216. by modem. Be careful, and use a file transfer protocol that doesn't pad
  217. the last sector out with extra bytes. Some versions of Xmodem do this,
  218. which causes some software to not run. This same thing happens when
  219. porting moving files between real 8 bits too.
  220.  
  221. Now boot up the file called STXFXP.PRG (out of the STXFXP.ARC file), and
  222. choose the "File Copy" option. Two file selectors will pop up. Use one of them
  223. to locate the 8 bit file that you just ported over. Use the other dialog box
  224. to locate a .SD file to copy it to, and click on it. Note that a directory
  225. of the 8 bit files stored in the .SD file appears. Select the proper direction arrow,
  226. (so it points towards the file selector with the .SD disk, and click on
  227. GO to perform the copy.
  228.  
  229. You can use the INFO button to give you size information on any files
  230. you select. Remember to click on GO to actually do it.
  231.  
  232. By changing the direction arrow, you can extract 8 bit files out of .SD
  233. file and save them back out to your 3 1/2" or hard disk. The file
  234. selectors work just as well in either direction, but be warned that bugs
  235. do exist in the File Xfer Program.
  236.  
  237. Before we leave the file selectors, note that the two file selectors
  238. are custom designed. The operate _almost_ like the real Atari file
  239. selector, with some extras. The closer box is on the bottom right, not
  240. on the upper left corner. If you try to "close" the root directory of
  241. a disk drive, you will get a list of available disks, without having to
  242. type anything!
  243.  
  244. The ST Xformer File Xfer Program just described was written very
  245. recently, and may still be quite buggy. I didn't even write it, which is
  246. why I'm not covering it in much detail right now because _I_ am still
  247. trying to figure it out. Note that many of the disk options, like MOVE,
  248. FORMAT, etc., are still fuzzed out. Look for a fuller version of the File
  249. Xfer Program soon, or if you register, it will be sent to you.
  250.  
  251. Now,  reboot the 8 bit computer and run Diskcomm.  It will allow you  to
  252. set  the source and destination drives.  The SOURCE drive is  the  drive
  253. which contains the disk to be ported. The DESTINATION drive is where you
  254. will  insert a blank formatted disk,  to which the source disk will  get
  255. written out as a file.
  256.  
  257. When  this  is done,  boot up the  terminal  software  again,  and
  258. transfer the disk file (should have a .DCM extender) to the ST.
  259.  
  260. Now  run Xformer II and enter the Atari Configuration dialog box  again.
  261. Click  on "Insert...",  then click on D1:,  and when the  file  selector
  262. appears, select TURBOBAS.SD. Now repeat this but select D2: as the drive
  263. to  load.  What  you have just done is loaded the 2  virtual  Atari  810
  264. drives that Xformer II emulates with 2 identical disks.
  265.  
  266. Before you boot though,  you will want to copy Diskcomm into one of  the
  267. virtual  810  drives.  To do this use the File Xfer Program again.
  268. Ok,  you've  clicked on it,  so another file  selector  appears.  Select
  269. DC32.COM  and the Xformer will copy the file from the ST disk  and  onto
  270. the virtual D1: disk, stored in Xformer's memory.
  271.  
  272. Now exit this and go up to "Xformer II" and select "Reboot".  Voila! The
  273. Atari 800 boots.  If you had BASIC plugged IN,  you should see the  word
  274. READY on the screen.  If so, type in DOS and press RETURN. Atari DOS 2.5
  275. will load.
  276.  
  277. I  assume that most people are familiar enough with DOS that they  don't
  278. need instructions.  If you do,  the documentation I supply to registered
  279. users will among other things, explain Atari DOS.
  280.  
  281. From DOS,  format D2:,  then write out the DOS files to it. What you are
  282. doing is creating a blank DOS 2.5 disk.
  283.  
  284. Make sure that Atari BASIC is OUT, and "Reboot" the Atari 800. Run
  285. DiskComm and choose D2:  as the source and D1:  as the destination. What
  286. you are going to do is uncompress the .DSC file now on D2:  and put  the
  287. uncompressed disk image on D1:.  Yes, this will overwrite the files from
  288. DEMODISK, but don't worry, it is safely stored on your ST disk.
  289.  
  290. Start DiskCom and watch the sectors fly.  In a few minutes, it will be 
  291. finished.  Now press F5,  click on "Eject...",  and save  this newly
  292. created D1 to a new .SD file.  For example, if you ported over the latest
  293. Analog monthly disk, you may want to call the file ANLG0888.SD.
  294.  
  295. Reboot the Atari 800 again and the new disk will boot.
  296.  
  297. SOUND COMPLICATED?!?!?!?!?!?!?!?!?!?!?!?!!?
  298.  
  299. It isn't really. If you think of the 2 virtual disk drives in Xformer II
  300. as  2  810 disk drives hooked up to an Atari 800,  you see  that  you're
  301. doing  nothing more than creating and copying files around on a  2  disk
  302. drive system.
  303.  
  304. I'm hoping the addition of the File Xfer Program makes .SD files a bit
  305. easier. The File Xfer Program does not handle double density disks (.DD
  306. files). The are two ways to generate a .DD file.
  307.  
  308. First, use the Sector Copy option of the F.X.P.  Use this if you have an
  309. external 5 1/4" inch disk drive hooked up to your ST (in drive B:). It
  310. will prompt you insert an 8 bit disk. Use a double density disk, one with
  311. 180K of storage. Insert the disk and you will see a "track: 00 sector:01"
  312. type diplay as the sectors get read. When finished, it writes out a 180K
  313. DISK.DD file to your current directory.
  314.  
  315. This only works with some disks. I found that my disks formatted on my
  316. Rana drive would not work, but disks formatted on an Indus GT or Atari
  317. 1050 with US Doubler did. If the disk can't read, you'll hear it! Just
  318. start banging on the Escape key to abort the read.
  319.  
  320. The second method is to simply do it within the emulator. Boot up the one
  321. sample file supplied, DOS20DD.DD in D1:, and a .SD file in D2:. Then run
  322. the Atari 800 and copy files as usual. Press F5 and "Eject..." to save out
  323. the new .DD file.
  324.  
  325. By the way, if you have an accessory like Deskcart installed when you run
  326. the emulator on a 1 Meg machine, there will not be enough memory to
  327. support the double density disk. In this case, only .SD files will load.
  328. Remove the accessory to get .DD support.
  329.  
  330. Oh,  did  I mention the Disk I/O option?  This allows you turn  off  the
  331. "beep  beep  beep"  sound  of  the disk drive  and  just  do  fast  disk
  332. emulation.  Useful  when running DiskComm but you may wish to  keep  the
  333. sound for old time's sake.
  334.  
  335.  
  336.                                   Part IV
  337.                                   -------
  338.  
  339. Well,  6  months after getting the first signs of life out of  Commodore
  340. Basic running under C64 emulation, Commodore Business Machines has still
  341. to return a single phone call of mine. Whenever I phone back, I'm put on
  342. hold,  transfered,  asked for my name and number,  and goodbye  Charlie!
  343. Obviously,  Commodore  has  not  learned how _not_  to  practise  public
  344. relations.  At  least  with  Apple  I got  as  far  as  getting  several
  345. "NO!!!!!!"s when I suggested that they licence their ROMs to me for  use
  346. with Xformer.
  347.  
  348. So, since neither one of those companies wishes to talk, perhaps someone
  349. can  guide me to a manufacturer of clone machines,  or  better  yet,  to
  350. someone  that  has written compatible versions of either  the  Apple  R]R[
  351. operating  system,  or  the Commodore 64 OS.  I believe that  both  such
  352. beasts exist,  (definately Apple clone ROMs) but I am unable to actually
  353. find  a _legitemate_ manufacturer.  Anyone  with  information,  _please_
  354. forward  it to me.  The day I get the clone code is the day  Xformer  II
  355. goes up with the Apple ][ and/or C64 options enabled.
  356.  
  357. As an experiment, I have enabled the Apple emulation, but it requires
  358. some work, on the part of you the user, to get it working. What you must do
  359. is copy over the Apple ][ operating system yourself, to the ST, and then
  360. run the emulator. The code involved resides at memory locations $C000 thru
  361. $FFFF on in the Apple's ROMS. Port it over, in any way you know, so that
  362. you get a 12288 byte file on your ST which contains that chuck of memory.
  363. Call the file APPLE.STX, place it in the same directory as STXF21.PRG, and
  364. run the emulator. When you click on the Apple menu selection, the file will
  365. load and the Apple will boot. Note, that it doesn't yet support Apple DOS,
  366. so it will be rather limited. The main point here is to see how many users
  367. can do this without difficulty.
  368.  
  369.  
  370.                                  Part V
  371.                                  ------
  372.  
  373. I  need to get some feedback from users regarding  what  software runs, 
  374. how well,  what doesn't run,  and how bad.  Also, any suggestions regarding
  375.  the user interface or features that could be put in  (have  I forgotten to
  376. emulate something?) are most welcome!
  377.  
  378. I would also be very interested in porting this program over to the  Mac
  379. II  and  the Amiga.  From what I've heard of the C64  emulators  on  the
  380. Amiga,  they're far slower than the Xformer,  (probably because  they're
  381. using the standard p-code interpreter code used in Xformer 1.2). I think
  382. Xformer II could blow them out of the water.  And on the Mac  II,  well,
  383. multiply the speed of Xformer by about 5, and you get the speed it would
  384. run  at on a Mac II.  Anyone interested,  simply send a Mac II or  Amiga
  385. 2000  to  the same address already given above,  and I'll  gladly  start
  386. porting  the  code  over.  Both  Commodore and Apple  seem  to  have  no
  387. complaints about emulators running on _their_ machines.  Also, if anyone
  388. wants to send me a Mega ST 2 or 4,  I'll be glad to add support for  all
  389. drives D1:  thru D8:, double and single density. (Maybe call it the Mega
  390. Xformer??) Unfortunately,  on a 1 Meg machine,  (with which Xformers are
  391. developed  on) there is only enough memory to support  D1:  and  D2:  in
  392. single density.
  393.  
  394.  
  395.                                      Part VI
  396.                                      -------
  397.  
  398. This  is an open invitation to all Atari 8 bit programmers to try  their
  399. software on the Xformer and see how it runs.  If it runs well, advertize
  400. that  fact.   Let  people  know  that  your  software  is  "Xformer   II
  401. Compatible".
  402.  
  403. If it doesn't run well,  but it is a small problem to fix, please take a
  404. few minutes to adjust your software to make it Xformer Compatible. Since
  405. most  of  the  incompatibilities will be in the area  of  speed,  it  is
  406. usually  simply  a matter of adjusting your timing loops.  To  help  you
  407. detect  the Xformer,  I have modified hardware register $D015 to  always
  408. return the value $C0 instead of $0F.  This is your way of detecting  the
  409. Xformer at run-time, so that proper adjustments can  be made.
  410.  
  411. If your software does not run at all, but you are interested in allowing
  412. ST users run your software,  please send me a copy of your software, and
  413. if possible, a listing, or simply a list of possible trouble points, and
  414. I'll try to fix the problem in updates of Xformer II.
  415.  
  416.  
  417.                                  Part VII
  418.                                  --------
  419.  
  420. There  is a section in Xformer II called "Scratch 'n Sniff".  This is  a
  421. billboard on which Atari related products or services can be advertized.
  422. It  is still not too late to place your ad.  I charge reasonable  rates.
  423. Ask the current bunch of paid advertizers!
  424.  
  425. Anyone  who gets a chance to try Xformer II on any of the 14 or  16  MHz
  426. accelerator boards,  please let me know if it runs,  and if so, how much
  427. faster.
  428.  
  429. I  have to acknowledge some of the people whose ideas made Xformer II  a
  430. reality.  First  there's Charles Smeton,  who soon after the release  of
  431. Xformer  1.1 pointed out to me on GEnie a code optimization that  I  now
  432. use in Xformer II.  Just before that, David Small, at a show in Toronto,
  433. scribbled  down his ideas on speeding up Xformer which later turned  out to
  434.  be  the  foundation  of  Xformer  II.  Actually,  Jan  Grey,  fellow
  435. University of Waterloo student,  ST owner,  and Microsoft employee,  had
  436. the  same idea about 6 months earlier,  but (sorry Jan) I though he  was
  437. kidding  when showed me the code!  Fortunately after I  refined  David's
  438. idea into real code,  Jan came up with the ultimate speed hack.  And  of
  439. course,  there's Bill Teal,  who's trying to do the same thing I am  but
  440. for a different CPU (and doing it better!), who pointed out a few things I
  441. could do, and did, to make Xformer II faster. The final result, as you
  442. already know, was a 100% increase in speed over the previous Xformers. I
  443. would also like to thank Robert Puff, the author of Diskcom, who helped me
  444. out with a lot of the technical stuff about the 8 bit Ataris.
  445.  
  446. Also, in the works: ST Xformer III 6502 emulator and compiler.  Does all
  447. the things  this one can with  one small difference.  Programs are first
  448. compiled into native 68000 code, _then_ executed. This should allow most
  449. Atari 800 programs to run at about twice their normal speed!
  450.  
  451. Finally, I'd just like to remind everyone once again that ST Xformer II
  452. _is_ a shareware product.  It is _not_ public domain.  Therefore,  if you
  453. use it,  please pay for it.  Out of the $20 you send, part of that will go
  454. back to you in the form of the documentation,  an update disk, and of
  455. course,  postage.  I think I'm making a very fair deal  here,  so let's 
  456. see  shareware work.  I don't want to become another one  of  the already 
  457. too  large  group of ST programmers who  put  out  a  shareware product,
  458. only to see it be used by everyone and paid for by no one.
  459.  
  460. DELPHI, GENIE: DAREKM
  461. Compuserve: 73657,2714
  462. Xformer Hotline: (519)-747-0386
  463.  
  464. Send your registration money ($20 US or $20 Canadian) to:
  465. 310-D Bluevale St. N., Waterloo, Ontario, CANADA N2J 4G3
  466.  
  467.  
  468.  
  469.                                  Part VIII
  470.                                  _________
  471.  
  472.  
  473. A Quick User Poll
  474.  
  475. I am very interested in hearing your comments. Many of you included letters
  476. with your registrations, but I'd like to hear from you now that you've had
  477. a better chance to try the latest Xformer.
  478.  
  479. Please spare about 30 minutes and put your thoughts on paper. An example of
  480. things I'd like to know are:
  481.  
  482.     - what you like about Xformer II
  483.     - what you don't like (not counting speed!)
  484.     - how you'd change the user interface in any way
  485.     - what you like and dislike about this manual
  486.     - any other things that come to mind
  487.  
  488. Also, do you think the $20 that this program costs is worth it, or a
  489. total ripoff? Would you recommend to other ST users to get Xformer II
  490. (assuming they  have an in terest in using emulators). Do you need full
  491. monochrome support?
  492.  
  493. Do you need full Apple ][ or Commodore 64 support? Do you know of any
  494. other 8 bit machines (not necessarily 6502  based) that you think should be
  495. emulated?
  496.  
  497. What sort of system do you primarily use Xformer II on? Color, mono,
  498. 520ST, 1040ST, Mega 2 or 4, hard drive, modem, etc. If you have a modem,
  499. would you be inter ested in an Xformer BBS (for updates, 8 bit programs,
  500. etc.)? Do you use any information services like Compuserve, GEnie, BIX, or
  501. DELPHI? Where did you first hear about Xformer II. Where did you first get
  502. it from?
  503.  
  504. Did you ever see or use the earlier Xformers (versions 1.00 thru 1.2)?
  505. Have you read any of the Xformer articles in ST Log, and if so, did you
  506. find them interesting, and would you be interested in a similar article
  507. explaining the inner workings of Xformer II?
  508.  
  509. Would you be willing to pay another $20 or more for Xformer III, which,
  510. if  written, would probably run at over 100% the speed of an 8 bit. If so,
  511. are  you prepared to wait 6 months to a year until it is completed.
  512.  
  513. If you don't want to write, you can always call by voice. If I'm not
  514. home,  I'll try to have an answering machine hooked up. Simple leave your
  515. name and comments and answers to the questions listed above.
  516.  
  517.  
  518.  
  519.  
  520.  
  521. This part is a bit technical and was left for the end of the file.
  522.  
  523.                                   Part IX
  524.                                   _______
  525.  
  526.  
  527. Making Patches to Xformer II:
  528.  
  529. Xformer II is set up to emulate North American 8 bit Ataris. It comes
  530. with  the 400/800 and XL operating systems built in, as well as the
  531. Fastchip floaing point routines, and Atari BASIC. It is also set up for a
  532. North American ST keyboard. You may, however, wish to modify this setup,
  533. by either installing your own version of the 8 bit operating system, or
  534. modifying the keyboard table for international versions of the ST and 8
  535. bit. It is also possible to replace the Atari BASIC code with code from
  536. some other 4K or 8K cartridge.
  537.  
  538. To make these patches, you will require a file editor or 68000 debugger
  539. monitor, since you will actually physically modify the file STXF21.PRG.
  540. Needles to say, back up this file before you start surgery! One monitor
  541. program I highly recommend is TEMPELMON, which is a truly fantastic
  542. debugger, and is available  on BIX, DELPHI, GEnie and Compuserve in both
  543. English and German versions.
  544.  
  545. First the keyboard stuff, since it is fairly easy. Using your file editor
  546. or monitor program, perform a string search through the STXF21.PRG file.
  547. Look for the string "KBDTBL" (minus the quation marks of course). Following
  548. this string  is a zero word, followed by several $FF bytes. These $FF bytes
  549. mark the beginning of  the keyboard table, and are the first few bytes of
  550. this table. (The first $FF is the first byte of the table). The keyboard
  551. table is 512 bytes long, made up of 128 entries of 4 bytes. This table maps
  552. an ST keyboard scancode into an 8 bit keyboard scan code. Unused scancodes
  553. are mapped to an $FF, which is the 8 bit's normal no-keypress scancode. The
  554. 4 bytes of each entry correspond to the normal, shift, control, and
  555. shift-control scancodes. For clarity, the first few lines of the keyboard
  556. table as it appears in the Xformer II source code are shown below. The
  557. bytes are packed into words  since the Laser C assembler generates
  558. incorrect code for the DC.B instructi on (pretty lousy bug, eh?)
  559.  
  560. ; Lookup table to map the ST's scan codes to the 8 bit internal code
  561. ; Keys that do not apply map to $FF
  562. ; There are 4 entries per line, regular, shift, control, control shift
  563.  
  564.     dc.w    'KB', 'DT', 'BL', 0
  565.  
  566. mpSTto8:
  567.     dc.w    0xFFFF, 0xFFFF      ; $00           
  568.     dc.w    0x1C5C, 0x9CDC      ; $01 Esc       
  569.     dc.w    0x1F5F, 0x9FDF      ; $02 1         
  570.     dc.w    0x1E75, 0x9EDE      ; $03 2 map to @ not "
  571.     dc.w    0x1A5A, 0x9ADA      ; $04 3         
  572.     dc.w    0x1858, 0x98D8      ; $05 4         
  573.     dc.w    0x1D5D, 0x9DDD      ; $06 5         
  574.     dc.w    0x1B47, 0x9BDB      ; $07 6 map to ^ not &
  575.     dc.w    0x335B, 0xB3F3      ; $08 7 map to & not '
  576.     dc.w    0x3507, 0xB5F5      ; $09 8 map to * not @
  577.     dc.w    0x3070, 0xB0F0      ; $0A 9         
  578.     dc.w    0x3272, 0xB2F2      ; $0B 0         
  579.     dc.w    0x0E4E, 0x8ECE      ; $0C -         
  580.     dc.w    0x0F06, 0x8FCF      ; $0D =         
  581.     dc.w    0x3474, 0xB4F4      ; $0E Backspace 
  582.     dc.w    0x2C6C, 0xACEC      ; $0F Tab       
  583.     dc.w    0x2F6F, 0xAFEF      ; $10 q         
  584.     dc.w    0x2E6E, 0xAEEE      ; $11 w         
  585.     dc.w    0x2A6A, 0xAAEA      ; $12 e         
  586.     dc.w    0x2868, 0xA8E8      ; $13 r         
  587.     dc.w    0x2D6D, 0xADED      ; $14 t         
  588.     dc.w    0x2B6B, 0xABEB      ; $20 y         
  589.  
  590. Once you've made the appropriate patches, save out the new STXF21.PRG
  591. file  and test it out. Make sure the file size remains the same. I'm sorry
  592. I can't provide more keyboard information, but Atari in Sunnyvale couldn't
  593. supply me with any more information other than to say that the keyboards in
  594. different countries are different. Tell me something I don't know guys!
  595.  
  596. Now for the operating system patches. A bit harder, but done in exactly
  597. the same way. STXF21.PRG contains a chunk of data, which contains the
  598. 400/800, XL, and Fastchip code, and Atari BASIC. It is arranged in the
  599. following order (with the headers shown):
  600.  
  601.     - Atari BASIC, $A000-$BFFF, 8192 bytes, header: "Atari BASIC:"
  602.     - 400/800 OS, $D800-$FFFF, 10240 bytes, header: "Atari OS revB:"
  603.     - XL/XE OS part 1, $D800-$FFFF, 10240 bytes, header: "XL code:"
  604.     - XL/XE OS part 2, $C000-$CFFF, 4096 bytes, header: "XL Extra code:"
  605.     - Fastchip FP routines, $D800-$DFFF, 2048 bytes, header: "Fastchip FP:"
  606.  
  607. As with the keyboard table, perform the string search for the appropriate
  608. header, and immediately following that string are two trailing zeroes and
  609. then the data block. If you plan on replacing Atari BASIC with code from a
  610. cartridge that is less than 8K in size, (Atari Chess, Missle Command, and
  611. Space Invaders are 4K, Fantastic Voyage is 2K), be sure to pad out the
  612. start of the data block with zeroes, as Xformer copies the entire 8K chunk
  613. into memory locations $A000 thru $BFFF. Similarly, if you plan on
  614. replacing the operating system code, replace the  400/800 code if the new
  615. OS is 8K in size, and the XL/XE code is the OS is 12K in size , not
  616. including the floating point package. All floating point packages should
  617. be 2K long, so it doesn't matter if you  replace the Atari or the Fastchip
  618. code. If you do patch the Xformer for international versions, I'd be very
  619. interested in finding out. Either send me the code that you patched it
  620. with, or send the the patched STXF21.PRG file, and I will expand Xformer II
  621. to include this code (except of couse, code extracted from cartridges).
  622.  
  623.  
  624.  
  625.  
  626. Thats all for now! Please excuse any typos. This was being edited at 6am!
  627.  
  628.